function Animal(skill) {
    this.skill = skill;
    this.colors = ["white", "black"]
}

Animal.prototype.say = function() {
    console.log("我有" + this.skill + "的能力！！!");
}

function Person(skill) {
    this.skill = skill;
}

Person.prototype = new Animal();


let p1 = new Person("写代码")
let p2 = new Person("开火车")
p1.colors.push("yellow")
console.log(p1.colors) // [ 'white', 'black', 'yellow' ]
console.log(p2.colors) // [ 'white', 'black', 'yellow' ]